package Practice.Practice_01;

import java.util.Scanner;

public class demo08 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(true){
            System.out.println("请输入三位数");
            int num = sc.nextInt();
            int count = 0;
            int a = num;
            while(true){
                if(a/10==0){
                    count++;
                    break;
                }
                a /= 10;
                count++;
            }
            if(count != 3){
                System.out.println("输入的不是三位数");
                break;
            }
            int x = num/100;
            int y = (num%100)/10;
            int z = num%10;
            int m = (int)(Math.pow(x,3)+Math.pow(y,3)+Math.pow(z,3));
            if(m==num){
                System.out.println("这是个水仙花数");
            }else{
                System.out.println("这不是个水仙花数");
            }
        }
    }
}
